<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/2/28
 * Time: 18:58
 */

namespace App\Http\Logics\MiniProgram;


use App\InterfaceUseLog;
use Illuminate\Support\Facades\DB;
use App\Http\Logics\BaseLogic;
class InterfaceUseLogLogic extends BaseLogic
{
    public static function getInterfaceUseLogList()
    {
        $interface_use_log = InterfaceUseLog::where(function($query){

        })->groupBy('name')->orderBy('count', 'desc')->get([DB::raw('COUNT(*) as count'), DB::raw('name')]);
        if (empty($interface_use_log)){
            return self::response(self::CONTENT_IS_EMPTY);
        }
        return self::response(self::SUCCESS, $interface_use_log);
    }
}